package com.ihr360.payroll.service.salaryfield;

import com.ihr360.commons.vo.PageData;
import com.ihr360.payroll.config.system.SystemSalaryFieldEntity;
import com.ihr360.payroll.model.dto.salary.meta.system.SystemSalaryField;
import com.ihr360.rest.service.SimpleRestService;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author richey
 */
public interface SystemSalaryFieldService extends SimpleRestService<SystemSalaryField, Long> {

    /**
     * 根据薪酬字段类型获取薪酬元数据分页集合
     * @param categoryId
     * @return
     */
    PageData<SystemSalaryFieldEntity> pageListByCategory(Long categoryId, Pageable pageable );

    /**
     * 获取除指定id外的所有薪酬字段元数据集合
     * @param excludeId
     * @return
     */
    List<SystemSalaryFieldEntity> listExcludeId(Long excludeId);

    SystemSalaryFieldEntity saveOrUpdate(SystemSalaryFieldEntity entity);

    /**
     *　根据薪酬字段类型获取薪酬元数据集合
     * @param categoryId
     * @return
     */
    List<SystemSalaryFieldEntity> listByCategory(Long categoryId);

    /**
     * 根据薪酬字段类型获取薪酬元数据集合
     * @param salaryFieldTypeId
     * @return
     */
    List<SystemSalaryFieldEntity> listBySalaryFieldType(Long salaryFieldTypeId,Boolean showInStaffSalary);

    SystemSalaryFieldEntity findByCode(String fieldCode);

    SystemSalaryFieldEntity findById(Long id);

    void deleteById(Long id);

    List<SystemSalaryFieldEntity> filterCountField(boolean countField);

    /**
     * 系统薪资字段对应的以total结尾的统计项
     * @return
     */
    List<SystemSalaryFieldEntity> getAllStatisticsSystemSalaryField();

    /**
     * 所有可以在员工薪资添加的项目
     * @return
     */
    List<SystemSalaryFieldEntity> listCanShowInStaffSalary();
}
